// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__0B702907_81B8_4514_9AEC_42E75ECAF9B8__INCLUDED_)
#define AFX_STDAFX_H__0B702907_81B8_4514_9AEC_42E75ECAF9B8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__0B702907_81B8_4514_9AEC_42E75ECAF9B8__INCLUDED_)
#include "stdio.h"
#include <string>
#include <iostream>
#include <fstream>  
#include <sstream>
#include  <winsock.h>
#include <map>

#define UM_SOCK WM_USER+100
#define BUFSIZE 1000
#define CHECK_SYN 1
#define CHECK_ACK 2
#define USER_LIST 3
#define CMD_FILE 4
#define FILE_DATA 5
#define CHAT_DATA 6

#define CHECK_SUCCESS 1
#define CHECK_FAILURE 2
typedef struct PDU {
	char type;
	int length;
	int flag;
	char data[BUFSIZE];
}PDU;
int SetDataPacket(PDU * buf,char type,int flag, char * data, int datalen);
int Buffer(PDU* buffer1, char * buffer2);
int GetDataFromPDU(PDU* buf, char *databuf);

